State = function (name) {
    this._name = name;
    this._rules = {};
};

State.prototype = {
    addRule:function (symbol, rule) {
        this._rules[symbol] = rule;
    },

    isHaltState:function () {
        return this._name === 'HALT';
    },

    getName:function () {
        return this._name;
    },

    getRule:function (symbol) {
        return this._rules[symbol];
    }
};
